Skip to content

feat: paginate sandboxes list and cover paused + running states#448

Merged
huv1k merged 14 commits into
mainfrom
huv1k/sandboxes-list-pagination-state
Jun 25, 2026
Merged

feat: paginate sandboxes list and cover paused + running states#448
huv1k merged 14 commits into
mainfrom
huv1k/sandboxes-list-pagination-state

Conversation

@huv1k

@huv1k huv1k commented Jun 23, 2026

Copy link
Copy Markdown
Member

What

Reworks the sandboxes list page (/dashboard/[teamSlug]/sandboxes/list) to address EN-1030:

  • State coverage — migrate from the legacy running-only GET /sandboxes to GET /v2/sandboxes with state=[running, paused], so the list now shows both paused and running sandboxes. A new State column renders a running/paused badge.
  • PaginationgetSandboxes is now a cursor-based infinite query (limit + nextToken, reading the next cursor from the X-Next-Token response header). The table infinite-scrolls (prefetch-on-scroll + a Load more fallback), mirroring the existing templates list.
  • Drop the live-metrics overlay — paused sandboxes have no live CPU/RAM/disk metrics, so the per-row metrics polling is removed. CPU/Memory/Disk columns now show allocated specs. The now-dead metrics code (use-sandboxes-metrics, metrics-store, the getSandboxesMetrics tRPC query + repository method, transformMetricsToClientMetrics, and the mock-metrics generator) is removed.
Before After
CleanShot 2026-06-23 at 16 11 58@2x CleanShot 2026-06-23 at 16 12 07@2x

Migrate the sandboxes list page from the legacy running-only GET /sandboxes
to GET /v2/sandboxes with state=[running,paused] and cursor pagination
(X-Next-Token). The list now infinite-scrolls, shows a State column, and
renders allocated specs instead of the live per-row metrics overlay (removed).

EN-1030
@cla-bot cla-bot Bot added the cla-signed label Jun 23, 2026
@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
web Ready Ready Preview, Comment Jun 25, 2026 11:21am

Request Review

Order: Started At · Instance · State · Template · CPU · Memory · Disk · Metadata.
Move Started At to the first (sort) column, rename the ID column to Instance,
and move State up next to Instance.
Restore the per-row live-metrics overlay (from /sandboxes/metrics) for
running sandboxes. Paused sandboxes have no live metrics, so they fall back
to their allocated specs. Metrics are only requested for running visible rows.
Narrow the State column (badge-sized), and render Started At with tabular
(non-mono) figures so the timezone offset (e.g. GMT+2) fits within the
fixed-width column instead of being clipped.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0957ee325a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/features/dashboard/sandboxes/list/table.tsx
Comment thread src/app/dashboard/[teamSlug]/sandboxes/(tabs)/list/page.tsx Outdated
Revert legacy sandbox list to the non-paginated /sandboxes endpoint and route the new flag-gated list through a dedicated listSandboxesPaginated procedure backed by /v2/sandboxes.
…pagination-state

# Conflicts:
#	src/core/modules/feature-flags/definitions.ts
#	tests/unit/feature-flags.test.ts
@huv1k huv1k merged commit 6ef7f07 into main Jun 25, 2026
13 checks passed
@huv1k huv1k deleted the huv1k/sandboxes-list-pagination-state branch June 25, 2026 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants